<?php
/**
 * Created by yuxianjun001@icloud.com
 * User: yuxianjun
 * Date: 2018/3/12 0012
 * Time: 下午 5:04
 */
namespace App\Http\Controllers;
use App\Http\Controllers\common\MyController;
//use App\Services\App\UserInfoService;
class ServiceTestController  extends MyController
{
    public function index(){
        $this->UserInfoService=app('App\Services\App\UserInfoService');//实例化服务层的服务类，赋值给$this->UserInfoService。
        $userInfo= $this->UserInfoService->index();//调用服务层类的方法
        echo $userInfo;
    }
}